﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VISS.API.Users;
using NCT.Framework;
using VISS.API.Commons;

namespace VISS.Web.BackEnd.Modules.User {

    public partial class UserDetailPage : System.Web.UI.Page {

        protected UserAdminEnt item = null;
        protected UserGeneralProfileEnt gItem = null;
        protected UserApperanceProfileEnt aItem = null;
        protected UserContactInfoEnt ciItem = null;
        protected UserFamilyProfileEnt fItem = null;
        protected UserLivingProfileEnt lItem = null;
        protected UserCultureProfileEnt cItem = null;

        protected void Page_Load(object sender, EventArgs e) {
            IUserAdmin _objectUser = StructureMapFactory.GetInstance<IUserAdmin>();
            IUserGeneralProfileAdmin _objectGeneral = StructureMapFactory.GetInstance<IUserGeneralProfileAdmin>();
            IUserAppearanceProfileAdmin _objectAppearance = StructureMapFactory.GetInstance<IUserAppearanceProfileAdmin>();
            IUserCultureProfileAdmin _objectCulture = StructureMapFactory.GetInstance<IUserCultureProfileAdmin>();
            IUserFamilyProfileAdmin _objectFamily = StructureMapFactory.GetInstance<IUserFamilyProfileAdmin>();
            IUserLivingProfileAdmin _objectLiving = StructureMapFactory.GetInstance<IUserLivingProfileAdmin>();
            IUserContactInfoAdmin _objectContact = StructureMapFactory.GetInstance<IUserContactInfoAdmin>();

            string userKey = Request.QueryString["key"];

            item = _objectUser.GetByUserKey_Admin(userKey);
            gItem = _objectGeneral.GetByUserKey(userKey);
            aItem = _objectAppearance.GetByUserKey(userKey);
            ciItem = _objectContact.GetByUserKey(userKey);
            fItem = _objectFamily.GetByUserKey(userKey);
            lItem = _objectLiving.GetByUserKey(userKey);
            cItem = _objectCulture.GetByUserKey(userKey);

            idAccountBox.UserItem = item;
        }
    }
}
